package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 结算单明细表单对象
 *
 * @author youlaitech
 * @since 2025-07-06 15:40
 */
@Getter
@Setter
@Schema(description = "结算单明细表单对象")
public class SettlementItemsForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "不能为空")
    private Integer id;

    @Schema(description = "结算单ID")
    @NotNull(message = "结算单ID不能为空")
    private Integer settlementId;

    @Schema(description = "结算单编号(冗余)")
    @Size(max=20, message="结算单编号(冗余)长度不能超过20个字符")
    private String settlementNumber;

    @Schema(description = "款号")
    @NotBlank(message = "款号不能为空")
    @Size(max=50, message="款号长度不能超过50个字符")
    private String styleId;

    @Schema(description = "款式名称")
    @Size(max=100, message="款式名称长度不能超过100个字符")
    private String styleName;

    @Schema(description = "颜色")
    @NotBlank(message = "颜色不能为空")
    @Size(max=50, message="颜色长度不能超过50个字符")
    private String color;

    @Schema(description = "尺码")
    @Size(max=20, message="尺码长度不能超过20个字符")
    private String size;

    @Schema(description = "数量")
    @NotNull(message = "数量不能为空")
    private Integer quantity;

    @Schema(description = "单价")
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    @Schema(description = "金额")
    private BigDecimal amount;

    @Schema(description = "生产日期")
    private LocalDate productionDate;

    @Schema(description = "产品图片URL")
    @Size(max=255, message="产品图片URL长度不能超过255个字符")
    private String imageUrl;

    @Schema(description = "备注")
    @Size(max=255, message="备注长度不能超过255个字符")
    private String remark;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改人ID")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
